﻿using System.ComponentModel.DataAnnotations;
using System.Linq;
using BaseAPI.BaseViewModel;
using WebTest.Models;

namespace WebTest.ViewModels.ProjectViewModel;

public class ProjectGetListByNameAndTransRequest : BaseGetListViewModel<Project, ProjectGetListResponse>
{
    /// <summary>
    /// 项目名称
    /// </summary>
    [MaxLength(30)]
    public string Name { get; set; }
    public override IQueryable<Project> QueryFun(IQueryable<Project> queryable)
    {
        return queryable.Where(x => x.Name.Contains(Name));
    }
}